# 导包
import unittest


# 自定义测试类,需要继承unittest模块中的TestCase类
class TestDemo(unittest.TestCase):
    @classmethod
    def setUpClass(cls) -> None:
        print('1setUpClass')

    def setUp(self) -> None:
        print('1setUp')

    def tearDown(self) -> None:
        print('2tearDown')

    def test_method1(self):
        print('第一个测试方法')

    def test_method2(self):
        print('第二个测试方法')

    def test_method3(self):
        print('第三个测试方法')

    @classmethod
    def tearDownClass(cls) -> None:
        print('2tearDownClass')


if __name__ == '__main__':
    # 执行测试用例
    unittest.main(verbosity=2)
